<!-- 模板文件 -->
<script type="text/javascript">
jQuery(function(){
	//换颜色
	jQuery('#colorChange span').click(function(){
			alert('此模块暂不支持更改颜色');
		});
	
	// 编辑收藏图标 ======================
	jQuery('.f100bm a').live('click',function(){
			var _bmpic = jQuery(this).children('img').attr('src');
			var _bmurl = jQuery(this).attr('href');
			var _bmpic_val = window.prompt('请输入图片地址,图片大小190×220',_bmpic);
			var __bmurl_val = window.prompt('默认是店铺收藏链接,也可以输入宝贝链接',_bmurl);
			if( _bmpic_val != "" && _bmpic_val != null ){ jQuery(this).children('img').attr('src',_bmpic_val); }
			if( __bmurl_val != "" && __bmurl_val != null ){ jQuery(this).attr('href',__bmurl_val); }
			return false;
		});
});
</script>
<div id="saveToDatabase">


	<div class="modl">
      
      <div class="f100-hd"></div>
      	
      	<div class="f100-bd">
			
            <table width="100%">
            	<tr>
                	<td width="300">
                    	<div class="f100search">
                        	<div class="empty"></div>
                            <form method="get" action="http://<?php echo 'shop'.$_SESSION["shopid"];?>.taobao.com/search.htm" target="_blank" accept-charset="gb2312" onsubmit="document.charset='gb2312';">
                                <div class="shop-search">
									<input type="text" name="keyword" id="keyword">
                                	<button class="button" type="submit">搜索</button>
                                </div>
                            </form>
                            <h3>
                            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/?search=y" title="查看所有宝贝">所有宝贝</a> / 
                            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=hotsell" title="按销量查看">按销量</a>
                            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=newOn" title="按新品查看">按新品</a>
                            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=price" title="按价格查看">按价格</a>
                            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=_hotkeep" title="按收藏查看">按收藏</a>
                 <!-- <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=_coefp" title="按人气查看">按人气</a> -->
                          </h3>
                            <ul class="wwBox1 clearFix">
						  <?php 
                          $wangwang_small = $wangwang;
                          $_k = 0;
                          $min_line = 2;
                          //$_count = count($wangwang);
                          foreach($wangwang as $key=>$val){
                               if($val['name'] == '应用服务访问权') continue;
                               echo '<li>';
                               echo '<dl class="wwBox2 clearFix">';
                               echo '<dt>'.$val['name'].'</dt>'; 
                                  if(count($val) > 1){
                                      foreach($val['group'] as $k=>$v) :
                                           $v2 = explode(':',$v);
                                           $v3 = count($v2) > 1 ? $v2[1] : $v2[0];
                                           echo '<dd><span>'.$v3.':</span><a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid='.$v.'&siteid=cntaobao&status=1&charset=utf-8"><img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid='.$v.'&site=cntaobao&s=2&charset=utf-8" alt="点这里给我发消息" /></a></dd>';
                                      endforeach;
                                  }
                               echo '</dl>';
                               echo '</li>';
                               unset($wangwang[$key]);
                               $_k++;
                               if($_k >= $min_line) break;
                           }
                          ?>
                          </ul>
                        </div>
                    </td>
                    <td>
                    	<ul class="lv1 clearFix">
						  <?php 
                          $_k = 0;
                          $min_line = 8;
                          $_count = count($test_cats);
                          foreach($test_cats as $key=>$val){
                               echo '<li>';
                               echo '<dl class="lv2 clearFix">';
                               echo '<dt><a href="http://shop'.$_SESSION["shopid"].'.taobao.com/search.htm?search=y&scid='.$key.'&queryType=cat" class="f100-m" target="_blank">'.$val['name'].'</a> -</dt>'; 
                                  if(count($val) > 1){
                                      foreach($val['sub'] as $k=>$v) :
                                           echo '<dd><a href="http://shop'.$_SESSION["shopid"].'.taobao.com/search.htm?search=y&scid='.$k.'&queryType=cat" target="_blank">'.$v.'</a></dd>';
                                      endforeach;
                                  }
                               echo '</dl>';
                               echo '</li>';
                               unset($test_cats[$key]);
                               $_k++;
                               if($_k >= $min_line) break;
                           }
                          $d_value = $min_line - $_count;
                          if($d_value > 0){
                              for($i=0;$i<$d_value;$i++){
                                  echo '<li><dl class="lv2 clearFix"></dl></li>';
                                  }
                            }
                            
                          ?>
                      </ul>
                    </td>
                </tr>
            </table>
          
    
        </div>
        
      </div>


</div> <!-- //saveToDatabase -->

<?php
	$data2['test_cats'] = $test_cats;
	$data2['wangwang'] = $wangwang;
	$data2['wangwang_small'] = $wangwang_small;
	$data2['fat1'] = 2;
	$data2['fat2'] = 1;
	$this->load->view('keyboard_service_view',$data2);
?>

<!--

<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid='.$v.'&siteid=cntaobao&status=1&charset=utf-8"><img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid='.$v.'&site=cntaobao&s=2&charset=utf-8" alt="点这里给我发消息" /></a>

http://muhaha.taobao.com/category.htm?search=y
http://muhaha.taobao.com/category.htm?search=y&orderType=hotsell_desc
orderType=newOn_desc
orderType=price_asc


$_SESSION["shopid"]

http://muhaha.taobao.com/category-338449197.htm?search=y&catName=%C9%FA%BB%EE%B4%F3%B1%AC%D5%A8%26middot%3BT%D0%F4
http://muhaha.taobao.com/search.htm?search=y&scid=338449197

http://design-xin.taobao.com/category-532939511.htm?search=y
http://design-xin.taobao.com/search.htm?search=y&scid=532939511&queryType=cat&scname=zca89rGqzsYmbWlkZG90O8TaxNo%3D
-->